

参考资料：https://cn.vuejs.org/guide/reusability/custom-directives.html#introduction



<template>
  <div>
  	<button v-cs="'112223'">测试指令</button>
  </div>
</template>

<script setup>
	import { reactive, ref, onMounted } from 'vue'

	const vCs = {
		mounted: (el, data) => {
			el.addEventListener('click', () => {
				console.log(data.value);
			})
		}
	}

</script>

<style scoped>

</style>












